﻿using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;

/// <summary>
/// Summary description for BilingualSentenceSearch
/// </summary>
/// 

public class BilingualSentenceSearch
{
    private BilingualSentSearchEngine.IndexingServiceProxy indexingServiceProxy;
   

    public BilingualSentenceSearch(string [] astrIndexingServiceList)
	{
        indexingServiceProxy = new BilingualSentSearchEngine.IndexingServiceProxy(astrIndexingServiceList);
	}

    public List<SentencePair> GetSentencePairByEnglish(string word, int iTopRecordNum)
    {
        List<SentencePair> sentpairList;
        sentpairList = indexingServiceProxy.QuerySentencePairByEnglish(ref word, iTopRecordNum);
        if (sentpairList.Count == 0)
        {
            return new List<SentencePair>();
        }

        return sentpairList;
    }

    public List<SentencePair> GetSentencePairByChinese(string word, int iTopRecordNum)
    {

        List<SentencePair> sentpairList;
        sentpairList = indexingServiceProxy.QuerySentencePairByChinese(ref word, iTopRecordNum);
        if (sentpairList.Count == 0)
        {
            return new List<SentencePair>();
        }

        return sentpairList;
    }


    public List<SentencePair> GetSentencePairByJapanese(string word, int iTopRecordNum)
    {
        List<SentencePair> sentpairList;
        sentpairList = indexingServiceProxy.QuerySentencePairByJapanese(ref word, iTopRecordNum);
        if (sentpairList.Count == 0)
        {
            return new List<SentencePair>();
        }

        return sentpairList;
    }
}
